﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Obfuscator
{
    public partial class ObfuscatorPathSettings : Form
    {
        public string NetFrameworkPath { get; set; }
        public string NetSDKPath { get; set; }

        public ObfuscatorPathSettings()
        {
            InitializeComponent();
            txtNETFrameworkPath.Text = ObfuscatorSettings.NETFrameworkPath;
            txtNETSDKPath.Text = ObfuscatorSettings.NETSDKPath;
        }

        private void btnOkObfuscatorPathSettings_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            NetFrameworkPath = txtNETFrameworkPath.Text;
            NetSDKPath = txtNETSDKPath.Text;
            Close();
        }

        private void btnCancelObfuscatorPathSettings_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }


        private void btnNETFrameworkPath_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            dialog.SelectedPath = txtNETFrameworkPath.Text;
            DialogResult result = dialog.ShowDialog(this);
            if (result != DialogResult.OK)
                return;

            txtNETFrameworkPath.Text = dialog.SelectedPath;
        }

        private void btnNETSDKPath_Click(object sender, EventArgs e)
        {
            FolderBrowserDialog dialog = new FolderBrowserDialog();
            dialog.SelectedPath = txtNETSDKPath.Text;
            DialogResult result = dialog.ShowDialog(this);
            if (result != DialogResult.OK)
                return;

            txtNETSDKPath.Text = dialog.SelectedPath;
        }




    }
}
